// 配置路由
import Header from '../components/Header'
import Login from '../pages/Login'
import MyPic from '../pages/MyPic'
import MyComments from '../pages/MyComments'
import MyHome from '../pages/MyHome'
import MyMemo from '../pages/MyMemo'
import AboutMe from '../pages/AboutMe'
import MyPapers from '../pages/MyPapers'
import ShowPaper from '../pages/ShowPaper'
// 引入后台管理页面
import Admin from '../pages/admin/Admin.vue'
import Article from '../pages/admin/Article.vue'
import Index from '../pages/admin/Index.vue'
import Linkz from '../pages/admin/Linkz.vue'
import Pictrues from '../pages/admin/Pictrues.vue'
import PapersLabel from '../pages/admin/PapersLabel.vue'
import PictrueLabel from '../pages/admin/PictrueLabel.vue'
import Publish from '../pages/admin/Publish.vue'
import PublishPic from '../pages/admin/PublishPic.vue'



export default [
  // 前台展示页面
  /*    {
      path: '/',
      name: 'myhome',
      component: MyHome,
      children: [
        {
          path: '/MyPapers',
          name: 'mypapers',
          component: MyPapers,
        },
        {
          path: '/AboutMe',
          name: 'aboutme',
          component: AboutMe,
        },
        {
          path: '/MyPic',
          name: 'mypic',
          component: MyPic,
        },
        {
          path: '/MyComments',
          name: 'mycomments',
          component: MyComments,
        },
        {
          path: '/MyMemo',
          name: 'mymemo',
          component: MyMemo,
        },
      ]
    }, */
  {
    path: '/',
    component: MyHome,
  },
  {
    path: '/MyPapers',
    component: MyPapers,
  },
  {
    path: '/AboutMe',
    component: AboutMe,
  },
  {
    path: '/MyPic',
    component: MyPic,
  },
  {
    path: '/MyComments',
    component: MyComments,
  },
  {
    path: '/MyMemo',
    component: MyMemo,
  },
  {
    path: '/ShowPaper/:id',
    name:'ShowPaper',
    component:ShowPaper,
  },
  // 登录页面
  {
    path: '/login',
    name: 'login',
    component: Login,
  },
  // 后台管理页面
  {
    path: '/admin',
    component: Admin,
    redirect: '/admin/index',
    children: [
      { path: '/admin/index', name: 'index', component: Index },
      { path: '/admin/pictrues', name: 'pictrues', component: Pictrues },
      { path: '/admin/publish', name: 'publish', component: Publish },
      { path: '/admin/article', name: 'article', component: Article },
      { path: '/admin/pictruelabel', name: 'pictruelabel', component: PictrueLabel },
      { path: '/admin/paperslabel', name: 'paperslabel', component: PapersLabel },
      { path: '/admin/linkz', name: 'linkz', component: Linkz },
      { path: '/admin/publishPic', name: 'publishPic', component: PublishPic },
    ]
  },
]